package com.suyuan.controller.admin;

import com.suyuan.entity.CompanyInfo;
import com.suyuan.service.CompanyService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * 公司控制器
 */
@Controller
@RequestMapping(value="/admin/company")
public class CompanyController {


    @Resource(name = "companyService")
    private CompanyService companyService;

    /**
     * 根据企业类型编码查找所有企业信息
     * @return
     */
    @RequestMapping("/findCompanyByFeedType")
    public @ResponseBody List<CompanyInfo> findAllFeedsCompany(Integer typeID){

       List<CompanyInfo> companyInfoList = companyService.findAllFeedCompany(typeID);
       if(companyInfoList != null){
           return  companyInfoList;
       }
        return null;
    }

}
